/*
 * @Author: your name
 * @Date: 2020-12-18 10:43:32
 * @LastEditTime: 2020-12-18 17:22:07
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \14.vuePC项目\day01\ccbb\src\utils\request.js
 */
import axios from 'axios'
import Vue from 'vue'
axios.defaults.baseURL = process.env.VUE_APP_BASEURL

axios.defaults.withCredentials = true

axios.interceptors.response.use(
  function (response) {
    // 对响应数据做点什么
    return response.data
  },
  function (error) {
    // 对响应错误做点什么
    return Promise.reject(error)
  }
)

Vue.prototype.$axios = axios
